package com.huanxing.cloud.mall.common.feign;

import com.huanxing.cloud.common.core.constant.SecurityConstants;
import com.huanxing.cloud.common.core.constant.ServiceNameConstants;
import com.huanxing.cloud.common.core.entity.Result;
import com.huanxing.cloud.common.feign.config.FeignInterceptor;
import com.huanxing.cloud.pay.common.dto.CreateOrderRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "feignPayService", value = ServiceNameConstants.PAY_API_SERVICE,
		configuration = FeignInterceptor.class)
public interface FeignPayService {

	@PostMapping("/pay/create-order")
	Result createOrder(@RequestBody CreateOrderRequest createOrderRequest,
			@RequestHeader(SecurityConstants.SOURCE) String source);

}
